<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>009-访问属性.html</title>
</head>
<body>
	
</body>
<script>
	function Person(name,age){
		this.name = name;
		this.age = age;
	}
	Person.prototype.showName = function(){
		console.log('I am'+this.name);
	}
	Person.prototype.showAge = function(){
		console.log('I am'+this.age + 'years old');
	}
	Person.prototype.LEGS = 2;

	var p1 = new Person('chris',22);
	console.log('p1.name::',p1.name);
	console.log('p1.showName::',p1.showName);
	console.log('p1.LEGS::',p1.LEGS);
	console.log('p1.toString::',p1.toString);
	console.log('p1.test::',p1.test);
	// p1.test();
</script>
</html>